﻿
@{
    ViewBag.Title = "Add";
    Layout = "~/Views/Shared/_MyLayout.cshtml";
}

<div class="header">

    <h1 class="page-title">新增用户</h1>
</div>

<ul class="breadcrumb">
    <li><a href="/Admin/Index">首页</a> <span class="divider">/</span></li>
    <li><a href="/Role/Index">角色管理</a> <span class="divider">/</span></li>
</ul>
<form id="form_add_Role" action="/Role/add" method="post">
    <div class="container-fluid">
        <div class="form-group">
            <label for="txtrolename">角色名称：</label>
            <input type="text" class="form-control" id="rolename" name="rolename" value="">
        </div>
        <div class="form-group">
            <label for="txtcontent">描述：</label>
            <textarea class="form-control" rows="4" cols="4" id="content" name="content"></textarea>            
        </div>        
        <button id="btnok" onclick="AddRole()" class="btn">提交</button>

    </div>
</form>

<script src="~/Scripts/jquery.form.js"></script>
<script>
    $("#form_add_Role").ajaxForm(function (data) {
        if (data.success) {
            alert(data.msg);
            window.location = "/Role/Index";
        } else {
            alert(data.msg);
        }

    });

</script>
